<?php
class Qrcode{

    public function getcode($bcgcode){
        include __DIR__."/class/BCGColor.php";
        include __DIR__."/class/BCGDrawing.php";
        include __DIR__."/class/BCGcode128.barcode.php";
        $colorFront = new BCGColor(0, 0, 0);
        $colorBack = new BCGColor(255, 255, 255);

// Barcode Part
        $code = new BCGcode128();
        $code->setScale(2);
        $code->setColor($colorFront, $colorBack);
        $code->setFont(0);
        $code->parse($bcgcode);

// Drawing Part
        $drawing = new BCGDrawing('', $colorBack);
        $drawing->setBarcode($code);
        $drawing->draw();

        header('Content-Type: image/png');
        $drawing->finish(BCGDrawing::IMG_FORMAT_PNG);

    }
}


?>